﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ttifa.MQ
{
    class Demo
    {
        static void Main(string[] args)
        {
            using (var rmq = new MQClient(MQType.Log, "LogMq"))
            {
                rmq.SendMessage("", "", DateTime.Now.ToLocalTime());
            }

            Answer();
            Console.ReadKey();
        }

        private static void Answer()
        {
            using (var rmq = new MQClient(MQType.Log, "LogMq"))
            {
                var msg = rmq.ReceiveMessage<string>();
                Console.WriteLine(msg);

                rmq.SendAck();
                //rmq.SendNAck();
            }
        }
    }
}
